Random number string output apparatus, random number string output method, program, and information recording medium

ABSTRACT

A random number sequence output apparatus ( 101 ) includes a sequence acceptance unit ( 102 ) for accepting input of a numerical sequence, an initial value setting unit ( 103 ) for accepting an initial value and causing a storage unit ( 104 ) to store this, an output unit ( 105 ) for outputting a new value stored in the storage unit ( 104 ), a calculation unit ( 106 ) for applying a predetermined rational map stored in he storage unit ( 104 ) each time the output unit ( 105 ) outputs a value and further applying a predetermined calculation unit to the value and value extracted from the numerical sequence accepted by the sequence acceptance unit ( 102 ), and an updating unit ( 104 ) to store the value of the result of calculation performed by the calculation unit ( 106 ), thereby performing updating.

TECHNICAL FIELD

The present invention relates to a random number sequence outputapparatus, a random number sequence output method, a program forrealizing the random number sequence output apparatus and the randomnumber sequence output method, and a computer readable informationrecording medium that stores the program.

BACKGROUND ART

Conventionally, an art of generating a random number sequence by a chaosmap applying a Chebyshev polynomial is known. This art of generatingsets a sequence x₀, x₁, x₂, . . . , that is obtained by providing aninitial value x₀ (−1<x₀<1) towards a recurrence formulax _(i+1) =T(a, x _(i))(i≧0)applying a Chebyshev map T (a, x₁) of an a^(th) (a≧2) degree defined byT(a, cos θ)=cos(aθ)towards an integer a. Other than the Chebyshev map, methods applyingvarious rational functions are proposed.

According to this art, it is known that by performing calculation of therecurrence formula by a rational number, a pseudorandom number sequencewithout a cycle can be obtained, and the distribution of the generatedrandom numbers can be analytically expressed.

However, even in a case of calculating a recurrence formula by arational expression of an infinite precision, it is preferable that agenerating method for various random numbers is realized.

In a case where the calculation of the recurrence formula is performedby a fixed-point notation of a predetermined precision or by afloating-point notation, a problem that, a cycle appears in the sequencethat is obtained, and that there is a case that the cycle is short.

Further, there is a problem that the distribution of the generatedsequence differs from the distribution of the above that can beanalytically expressed, in that the obtained distribution becomes asingular one because of the short periodicity.

The present invention is a method for avoiding these kinds of problems,and the purpose of the present invention is to provide a random numbersequence output apparatus, a random number sequence output method, aprogram for realizing the two, and a computer readable informationrecording medium that stores the program.

DISCLOSURE OF INVENTION

To achieve the object of the above, according to the basis of thepresent invention, the invention of below will be disclosed.

A random number sequence output apparatus according to a first aspect ofthe present invention, comprises a sequence acceptance unit, an initialvalue setting unit, a storage unit, an output unit, a calculation unit,and an updating unit, and is structured as below.

Namely, the sequence acceptance unit accepts input of a numeralsequence.

The initial value setting unit accepts input of an initial value, andthe initial value is stored to the storage unit.

The output unit outputs the value each time a new value is stored to thestorage unit.

The calculation unit applies a predetermined rational map to the valuestored in the storage unit, and further calculates, by carrying out apredetermined operation to the value of above and a value sequentiallyextracted from the numerical sequence accepted by the sequenceacceptance unit.

The updating unit updates by storing the results of the value calculatedby the calculation unit to the storage unit.

In the random number sequence output apparatus according to the presentinvention, the predetermined rational map may be structured to be aChebyshev map of equal to or higher than a second degree.

In the random number sequence output apparatus according to the presentinvention, the storage unit may be structured to store the value at afixed-point notation of a predetermined number of bits.

In the random number sequence output apparatus according to the presentinvention, the predetermined operation may be structured to invert thebits of a predetermined position of a fixed-point notation of thepredetermined number of bits of the value, in a case where a valuesequentially extracted from the numerical sequence is a predeterminedvalue.

In the random number sequence output apparatus according to the presentinvention, the numerical sequence may be structured so that the sequencethat has a length T repeats a binary sequence (including a gold code, anM sequence, and a Baker sequence, etc.), taking a value of 0 or 1, andthat the bit of the predetermined position may be a least significantbit of the fixed-point notation, and the predetermined value may be 1.

A random number sequence output method according to another aspect ofthe present invention comprises a sequence acceptance step, an initialvalue setting step, an output step, a calculation step, and an updatingstep, and is structured as below.

Namely, the sequence acceptance step accepts input of a numericalsequence.

The initial value setting step accepts input of an initial value, andstores the value in the storage unit.

The output step outputs the value each time a new value is stored in thestorage unit.

The calculation step applies a predetermined rational map to the valuestored in the storage unit, and further calculates, by carrying out apredetermined operation to the value of above and a value sequentiallyextracted from the numerical sequence accepted in the sequenceacceptance step.

The updating step updates by storing the results of the value calculatedin the calculation step, to the storage unit.

In the random number sequence output method according to the presentinvention, the predetermined rational map may be structured to be aChebyshev map of equal to or higher than a second degree.

In the random number sequence output method according to the presentinvention, it may be structured so that the value is stored in afixed-point notation of a predetermined bit to the storage unit, in theinitial value setting step and the updating step.

In the random number sequence output method according to the presentinvention, the predetermined operation may be structured to invert thebits of a redetermined position of a fixed-point notation of thepredetermined number of bits of the value, in a case where a valuesequentially extracted from the numerical sequence is a predeterminedvalue.

In the random number sequence output method according to the presentinvention, the numerical sequence may be structured so that a sequencethat has a length T repeats a binary sequence (including a gold code, anM sequence, and a Baker sequence, etc.), taking a value of 0 or 1, andthat the bit of the predetermined position is a least significant bit ofthe fixed-point notation, and the predetermined value is 1.

A program according to another aspect of the present invention isstructured to control a computer (including an ASIC (ApplicationSpecific Integrated Circuit), a DSP (Digital Signal Processor), or anFPGA (Field Programmable Gate Array), etc.,) to function as the aboverandom number sequence output apparatus, or to control the computer toexecute the above random number sequence output method.

The program of the present invention may be stored to a computerreadable information recording medium (including a compact disk, aflexible disk, a hard disk, a magnetic optical disk, a digital videodisk, a magnetic tape, and a semiconductor memory).

The above random number sequence output apparatus and the random numberoutput method may be realized by executing the program of the presentinvention by a general computer, a portable telephone, a PHS (PersonalHandyphone System) device, a portable terminal such as a game device,etc., an information processing device, such as a parallel computer,etc., an ASIC, a DSP, or an FPGA, etc., that comprises a storage device,a calculating device, an output device, and a communication device, etc.

Independent from these devices, the information recording medium of theresent invention can be distributed or sold in stores, etc., or theprogram of the resent invention may be distributed and sold via acomputer communication network.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a diagram showing an outline structure of a random numbersequence generating apparatus according to an embodiment of the presentinvention.

FIG. 2 is a flowchart showing a random number sequence generating methodexecuted in the random number sequence generating apparatus.

FIG. 3 is an explanatory diagram showing a situation of a case where afixed point notation of N bits is adopted

FIG. 4 is diagram showing a situation of a Chebyshev map.

FIG. 5 is a graph showing a sequence distribution, in a case where asequence is generated by a Chebyshev map at a rational number notationof an infinite precision.

FIG. 6 is a graph showing a sequence distribution, in a case where bitharnessing is not carried out at an 8 bit precision.

FIG. 7 is a graph showing a sequence distribution, in a case where theabove embodiment is adopted at an 8 bit precision.

FIG. 8 is a graph showing a sequence distribution, in a case where bitharnessing is not carried out at a 12 bit precision.

FIG. 9 is a graph showing a sequence distribution, in a case where theabove embodiment is adopted at a 12 bit precision.

FIG. 10 is a graph showing a sequence distribution, in a case where bitharnessing is not carried out in a 16 bit precision.

FIG. 11 is a graph showing a sequence distribution, in a case where theabove embodiment is adopted at a 16 bit precision.

BEST MODE FOR CARRYING OUT THE INVENTION

(Embodiment of the Invention)

An embodiment of the present invention will be described below. Theembodiments described below are illustrated and do not restrict thescope of the invention. It is therefore possible for those skilled inthe art to employ embodiments in which those individual elements or allthe elements are replaced with their equivalent elements, but thoseembodiments are also included in the scope of the invention.

FIG. 1 is a diagram showing a schematic structure of a random numbersequence generating apparatus according to an embodiment of the presentinvention. FIG. 2 is a flowchart showing processing of a random numbersequence generating method executed in the random string generatingapparatus. Below, descriptions will be made with reference to thesedrawings.

A random number sequence output apparatus 101 comprises a sequenceacceptance unit 102, an initial value setting unit 103, a storage unit104, an output unit 105, a calculation unit 106, and an updating unit107.

First, the sequence acceptance unit 102 accepts input of a numericalsequence (step S201). The numerical sequence is typically a repetitionof a binary sequence, such as a gold code, an M sequence, and a Bakersequence, etc. The gold code and the M sequence is a pseudorandom numbersequence of a value of 0 or 1 of a cycle T−2^(n)−1.

The sequence acceptance unit 102 accepts a numerical sequence of alength T as an integer value, stores the integer value, and as will belater described, may cyclic shift (also called “rotate” and “shiftrotate”) the integer value, after using the integer value tosequentially obtain the least significant bit of the integral value.

The initial value setting unit 103 accepts input of an initial value(step S202), and the initial value is stored to the storage unit 104(step S203).

The storage unit 104 typically stores values at a fixed-point notationof a predetermined bit number.

FIG. 3 shows a situation where a fixed-point notation of N bits isadopted. FIG. 3 illustrates a case of fixed-points of 0 to 1. Placingthe order from the highest-order bit to the least significant bit in anorder of b₀, b₁, b₂, . . . , b_(N-1), each of them takes a value of 1 or0.

This fixed-value notation:Σ_(n=0) ^(N−1)(½)^(n+1) b _(n).corresponds to a value of equal to or higher than 0 and less than 1.

In most calculators, when looking at this fixed-value notation as anunsigned integer, the fixed-value notation corresponds to an integervalue of:Σ_(n=0) ^(N−1)2^(N−1−n) b _(n)

Other than this, in a case of a fixed-point number of −1 to 1, any oneof b₀ to b_(N−1) (typically b₀) is set as a code bit, and thefixed-point notation is expressed by the left others. For example, in acase where b₀ is set as the code bit, the fixed-point notation by b₀ tob_(N−1) corresponds to:Σ_(n=1) ^(N−1)(½)^(n) b _(n) in the case of b ₀=0, and

corresponds to:−Σ_(n=1) ^(N−1)(½)^(n) b _(n) in the case of b ₀=1.

Further, the output unit 105 outputs this, each time a new value isstored to the storage unit 104 (step S204).

Then, each time the output unit 105 outputs a value, the calculationunit 106 applies a predetermined rational map to the value stored in thestorage unit 104 (step S205), and further calculates, by carrying out apredetermined operation (hereinafter referred to as “harnessing”) to thevalue of above and a value sequentially extracted from the numericalsequence accepted by the sequence acceptance unit 102 (step S206).

Typically, the predetermined rational map is a Chebyshev map of a degreeequal to or higher than a second degree. FIG. 4 is a graph showing asituation of a Chebyshev map. The Chebyshev map can be expressed asbelow, by polynomials:T(0, x)=1T(1, x)=xT(2, x)=2x ²−1T(3, x)=4x ³−3x

Each polynomial of the Chebyshev polynomial y=T(a, x) is a rational mapthat maps an open interval of −1<x<1 to an open interval of −1<y<1.

In FIG. 4, a Chebyshev polynomial of a second to fifth degree is shownin a graph in the form of y=T(2, x), y=T(3, x), y=T(4,x), and y=T(5, x).The horizontal axis is the x axis, and the vertical axis is the y axis.

Moreover, typically, in a case where the value sequentially extractedfrom the numerical sequence is a predetermined value, a bit harnessingoperation inverts the bits of a predetermined position of a fixed-pointnotation of the predetermined number of bits of the value. Namely, in acase where the predetermined value is 1, a bit harnessing operationinverts the value of the least significant bit b_(N−1).

As described above, from the numeral sequence with an origin of anM-sequential, etc., a value of 0 or 1 can be obtained. However, lookingat this “value of 0 or 1” and the fixed-point notation stored in thestorage unit 106 as an “unsigned integer”, the exclusive OR of the twois calculated, and this can be stored in the storage unit 106.

An embodiment of calculating an exclusive OR with a bit of anotherposition, and not the least significant bit, can be adopted. However, itis preferable that the it is not the code bit.

The updating unit 107 updates by storing the results of the valuecalculated by he calculation unit 106 to the storage unit 104 (stepS207), and returns to step S204.

The operation of bit harnessing may be another mode. For example,according to the above fixed-point notation, no matter what the value ofb₀ to b_(N−1)is, because the fixed-point that expresses the value is inthe range of −1 to 1, various bit calculations, etc., can be considered.For example, a calculation of below can be considered.

-   Cyclic shifting the bit sequence of the fixed-point notation, by the    value sequentially extracted (0 or 1) from the numerical sequence.-   Adding the value sequentially extracted (0 or 1) from the numerical    sequence to a value looking at the bit sequence of the fixed-point    notation as an “unsigned integer”.-   Subtracting the value sequentially extracted (0 or 1) from the    numerical sequence, from a value looking at the bit sequence of the    fixed-point notation as an “unsigned integer”.-   Exchanging the value of bit b_(p) and bit b_(q) concerning    predetermined integers p and q, (0≦p, q≦N−1), in a case where the    values sequentially extracted from the numerical sequence is a    pre-set value (for example, 1).

Concerning these calculations, it can be determined which calculation toadopt, considering the cycle of the sequence that can be obtained.

(Results of Experiment)

FIG. 5 is a graph showing a sequence distribution, in a case where asequence is generated by a Chebyshev map at a rational number notationof an infinite precision.

FIG. 6 is a graph showing a sequence distribution, in a case where a bitharnessing operation is not carried out at an 8 bit precision. FIG. 7 isa graph showing a sequence distribution, in a case where the aboveembodiment is adopted at an 8 bit precision. FIG. 8 is a graph showing asequence distribution, in a case where a bit harnessing operation is notcarried out at a 12 bit precision. FIG. 9 is a graph showing a sequencedistribution, in a case where the above embodiment is adopted at a 12bit precision. FIG. 10 is a graph showing a sequence distribution, in acase where a bit harnessing operation is not carried out in a 16 bitprecision. FIG. 11 is a graph showing a sequence distribution, in a casewhere the above embodiment is adopted at a 16 bit precision.

Comparing these graphs, in the sequence distributions where a bitharnessing operation is not carried out, there is a large deviation, andthere is a large difference compared to the sequence distributions whererational number notation of an infinite precision is adopted. However,using the method of the present embodiment, it can be seen that thesequence distributions where a bit harnessing operation is carried outis similar to sequence distributions where rational number notation ofan infinite precision is adopted, and a good pseudorandom number isobtained.

Looking at the cycle of the output sequence, by carrying out a bitharnessing operation in the same way as the present embodiment, it canbe seen that in most cases, the cycle becomes longer by several times ordozens of times. Therefore, a more preferable pseudorandom numbersequence can be obtained.

Those skilled in the art can carry out the present invention byembodiments other than the preferred embodiment described in thedescription, which is illustrated and do not restrict the scope of theinvention, and understands that the present invention is limited only bythe scope of claims. Equivalents to the specific embodiment argued inthe description can also carry out the present invention in the sameway.

The patent application is based on Japanese Patent Application No.2001-339429 filed with the Japan Patent Office on Nov. 5, 2001, thecomplete disclosure of which is hereby incorporated by reference.

INDUSTRIAL APPLICABILITY

As described above, according to the present invention, a random numbersequence output apparatus, a random number sequence output method, aprogram for realizing the random number sequence output apparatus andthe random number sequence output method, and a computer readableinformation recording medium that stores the program, can be provided.

1. A random number string output apparatus (101) that comprises asequence acceptance unit (102), an initial value setting unit (103), astorage unit (104), an output unit (105), a calculation unit (106), andan updating unit (107), characterized in that: said sequence acceptanceunit (102) accepts input of a numeral sequence; said initial valuesetting unit (103) accepts input of an initial value, and the initialvalue is stored to the storage unit (104); said output unit (105)outputs the value each time a new value is stored to the storage unit(104); said calculation unit (106) applies a predetermined rational mapto the value stored in the storage unit (104), and further calculates,by carrying out a predetermined operation to the value of above and avalue sequentially extracted from the numerical sequence accepted by thesequence acceptance unit (102), and said updating unit (107) updates bystoring the results of the value calculated by the calculation unit(106) to the storage unit (104); said storage unit stores the value at afixed-point notation of a predetermined number of bits; thepredetermined operation inverts the bits of a predetermined position ofa fixed-point notation of the predetermined number of bits of the value,in a case where a value sequentially extracted from the numericalsequence is a predetermined value, and said predetermined rational mapis a Chebyshev map T (a, •) of an a ^(th) (a≧2) degree defined by T (a,cos θ)=cos (aθ) towards an integer number a.
 2. The random number stringoutput apparatus (101) according to claim 1, characterized by cyclicshifting a bit string of a fixed-point notation of a predeterminednumber of bits of the value, by the number of bits corresponding topredetermined value, instead of inverting the bits of a predeterminedposition of a fixed-point notation of the predetermined number of bitsof the value, in said predetermined operation.
 3. The random numberstring output apparatus (101) according to claim 1, characterized byadding or subtracting the predetermined value to the bit string of afixed-point notation of a predetermined number of bits of the value,looking at the string as an unsigned integer, instead of inverting thebits of a predetermined position of a fixed-point notation of thepredetermined number of bits of the value, in said predeterminedoperation.
 4. The random number string output apparatus (101) accordingto claim 2, characterized by exchanging the bits of two predeterminedpositions of the bit string of a fixed-point notation of a predeterminednumber of bits of the value, instead of inverting the bits of apredetermined position of a fixed-point notation of the predeterminednumber of bits of the value, in said predetermined operation.
 5. Therandom number string output apparatus (101) according to any one ofclaims 1 to 4, characterized in that: the numerical sequence has alength T that repeats a binary sequence (including a gold code, an Msequence, and a Baker sequence, etc.), taking a value of 0 or 1, and thebit of the predetermined position is a least significant bit of thefixed-point notation, and the predetermined value is
 1. 6. A randomnumber string output method using a storage unit that stores values,comprising a sequence acceptance step, an initial value setting step, anoutput step, a calculation step, and an updating step, and ischaracterized in that: the sequence acceptance step accepts input of anumerical sequence; the initial value setting step accepts input of aninitial value, and stores the value in said storage unit; the outputstep outputs the value each time a new value is stored in said storageunit; the calculation step applies a predetermined rational map to thevalue stored in the storage unit, and further calculates, by carryingout a predetermined operation to the value of above and a valuesequentially extracted from the numerical sequence accepted in thesequence acceptance step, and the updating step updates by storing theresults of the value calculated in the calculation step, to said storageunit; the value at a fixed-point notation of a predetermined number ofbits is stored to said storage unit in said initial value setting stepand said updating step; the predetermined operation inverts the bits ofa predetermined position of a fixed-point notation of the predeterminednumber of bits of the value, in a case where a value sequentiallyextracted from the numerical sequence is a predetermined value, and saidrational map is a Chebyshev map T (a, •) of an a^(th) (a≧2) degreedefined by T (a, cos θ)=cos (aθ) towards an integer number a.
 7. Therandom number string output method according to claim 6, characterizedby cyclic shifting a bit string of a fixed-point notation of apredetermined number of bits of the value, by the number of bitscorresponding to the predetermined value, instead of inverting the bitsof a predetermined position of a fixed-point notation of thepredetermined number of bits of the value, in said predeterminedoperation.
 8. The random number string output method according to claim6, characterized by adding or subtracting the predetermined value to thebit string of a fixed-point notation of a predetermined number of bitsof the value, looking at the string as an unsigned integer, instead ofinverting the bits of a predetermined position of a fixed-point notationof the predetermined number of bits of the value, in said predeterminedoperation.
 9. The random number string output method according to claim6, characterized by exchanging the bits of two predetermined positionsof the bit string of a fixed-point notation of a predetermined number ofbits of the value, instead of inverting the bits of a predeterminedposition of a fixed-point notation of the predetermined number of bitsof the value, in said predetermined operation.
 10. The random numberstring output method according to any one of claims 6 to 9,characterized in that: the numerical sequence is a length T, and is asequence that repeats a binary sequence (including a gold code, an Msequence, and a Baker sequence, etc.), taking a value of 0 or 1; the bitof the predetermined position is a least significant bit of thefixed-point notation, and the predetermined value is
 1. 11. A programthat controls a computer to function as the random number string outputapparatus according to any one of claims 1 to
 4. 12. A program thatcontrols a computer to execute the random number string output methodaccording to any one of claims 6 to
 9. 13. A computer readableinformation recording medium (including a compact disk, a flexible disk,a hard disk, a magnetic optical disk, a digital video disk, a magnetictape, and a semiconductor memory) characterized by storing the programaccording to claim 11.